<?php
/*
 * @Author: 天羽落星辰
 * @Date: 2020-07-08 16:56:40
 * @LastEditors: 天羽落星辰
 * @LastEditTime: 2020-07-09 14:44:59
 * @Description: file content
 */ 

namespace app\admin\validate;

use think\Validate;

class Feedback extends Validate
{
    /**
     * 验证规则
     */
    protected $rule = [
        'email' => 'require|email',
        'content'  => 'require|max:20',
    ];
    /**
     * 提示消息
     */
    protected $message = [
        'content.require' => '内容是必须的',
        'content.max'     => '内容最多不能超过25个字符',
        'email'        => '邮箱格式错误',
        'email.require'  => '邮箱是必须的',
    ];
    /**
     * 验证场景
     */
    protected $scene = [
        'add'  => ['email','content'],
        'edit' => [],
    ];
    
}
